package cn.kgc.crowd1048.fundingadmin.service.impl;


import cn.kgc.crowd1048.fundingadmin.mapper.MenuMapper;
import cn.kgc.crowd1048.fundingadmin.pojo.Menu;
import cn.kgc.crowd1048.fundingadmin.service.MenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zwr
 * @since 2024-04-22
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements MenuService {

    @Resource
    MenuMapper menuMapper;
    @Override
    public List<Menu> getAll() {
        return menuMapper.selectList(null);
    }

    @Override
    public void saveMenu(Menu menu) {
        menuMapper.insert(menu);
    }

    @Override
    public Menu getMenuById(Integer id) {

        return menuMapper.selectById(id);
    }

    @Override
    public void update(Menu menu) {
        menuMapper.updateById(menu);
    }

}
